﻿<local:DocumentBase x:Class="WPFExcelReport.COWSEDIT"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"                    
                    xmlns:db="clr-namespace:INTEX.DataBase"
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    xmlns:wep="clr-namespace:WPFExcelReport"
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"                                        
                   Background="White"
                    Loaded="Window_Loaded"
     >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:String2ColorConverter  x:Key="str2color"/>
        <ucd:PreisConverter  x:Key="PreisConverter"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <CollectionViewSource   x:Key="vwVKP" Source="{Binding Path=SetData.ICC_VKPRICE}" />
    </local:DocumentBase.Resources>
    <Grid   >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="1*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions> 
            <ColumnDefinition Width="1*"/>
        </Grid.ColumnDefinitions> 
            <WrapPanel Grid.Row="0" Grid.Column="0">
                <Button Margin="80,0,0,0" Content="{Binding Source={Localization:TranslateExtension Word=查询}}" FontSize="18"  Click="btnQuery_Click"></Button>
                <Button Margin="20,0,0,0" Content="{Binding Source={Localization:TranslateExtension Word=删除}}" FontSize="18"  Click="btnDelete_Click"></Button>
            </WrapPanel>
         
        <DataGrid  Grid.Row="1" Grid.Column="0" VerticalAlignment="Top"  
                AutoGenerateColumns="False"
                EnableRowVirtualization="False"
                VerticalScrollBarVisibility="Auto"
                HorizontalScrollBarVisibility="Auto"
                HeadersVisibility="Column"                 
                HorizontalAlignment="Stretch"               
                ItemsSource="{Binding Source={StaticResource ResourceKey=vwVKP}}"  
                x:Name="dlgVKPRICE" 
                Margin="0,1,0,0"             
                RowDetailsVisibilityMode="Visible"
                    >
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=ROWNID}" Header="ROWNID"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VKPAUFKRS, Converter={StaticResource ResourceKey=Trim}}" Header=""  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VKPAUFLFD, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=销售单}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VKPART, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=品种}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VAABEZ, Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:TranslateExtension Word=名称}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VKPQTY, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=数量}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VKPUNIT, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=单位}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=MCOSTMY, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=原料价格}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=MCOSTDY, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=染色费}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=MCOSTPROD, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=生产费用}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=MCOSTPROD, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=加工费}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=NEWUSER, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=创建者}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=NEWTIME, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=创建日期}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=CHGUSER, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=修改者}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=CHGTIME, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=修改日期}}"  Width="Auto" />
            </DataGrid.Columns>
        </DataGrid  >
    </Grid>

</local:DocumentBase>